<template>
  <div class="app-container">
    <div class="top-search">
      <searchForm
        ref="searchForm"
        :search-data="formInline"
        :search-form="searchForm"
        :search-handle="searchHandle"
      >
      </searchForm>
    </div>
    <baseTable :table="tableProperty"></baseTable>
  </div>
</template>

<script>
import searchForm from "@/components/SearchForm";
import baseTable from "@/components/Table/baseTable";
export default {
  name: "Dashboard",
  components: { searchForm, baseTable },
  data() {
    return {
      formInline: { name: "" },
      searchForm: [
        {
          type: "Input",
          prop: "name",
          placeholder: "请输入进行搜索"
        }
      ],
      searchHandle: [
        {
          label: "搜索",
          type: "primary",
          handle: () => {}
        }
      ],
      tableProperty: {
        tableData: [
          {
            tel: "6488978",
            adress: "测试地址呵呵呵",
            date: "2020-12-12",
            name: "中国",
            num: 25
          },
          {
            tel: "6488978",
            adress: "测试地址呵呵呵",
            date: "2020-12-12",
            name: "中国",
            num: 25
          },
          {
            tel: "6488978",
            adress: "测试地址呵呵呵",
            date: "2020-12-12",
            name: "中国",
            num: 25
          },
          {
            tel: "6488978",
            adress: "测试地址呵呵呵",
            date: "2020-12-12",
            name: "中国",
            num: 25
          },
          {
            tel: "6488978",
            adress: "测试地址呵呵呵",
            date: "2020-12-12",
            name: "中国",
            num: 25
          },
          { tel: "6488978", date: "2020-12-15", name: "日本", num: 35 }
        ],
        tableColumn: [
          {
            label: "日期",
            prop: "date"
          },
          {
            label: "姓名",
            prop: "name"
          },
          {
            label: "邮箱",
            prop: "tel"
          },
          {
            label: "电话",
            prop: "tel"
          },
          {
            label: "地址",
            prop: "adress"
          },
          {
            label: "数值",
            prop: "num"
          }
        ],
        tableOption: {
          label: "操作",
          buttons: [
            { name: "编辑", methods: "edit" },
            { name: "删除", methods: "delete", style: { color: "red" } }
          ]
        },
        Pagination: {
          currentPage: 1,
          total: 100,
          pageSize: 10
        }
      }
    };
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {}
  }
};
</script>

<style lang="scss" scoped></style>
